/* This is application router. 
 */
define( [ 
		'underscore', 
		'jquery',
		'backbone'
	  	], 
function( _, $, Backbone ) {
	var LibraryRouter = Backbone.Router.extend({
		routes: {
			'about': 'aboutDlg',
  			'addBookForm': 'showAddBookForm',	
  			'showLibrary': 'showLibraryView'	
		},

		aboutDlg: function() {
			console.log("About dialog trigger detected");

		},
		
		showAddBookForm: function() {
			console.log('Add Book Router');
			$('#books').attr({'style':'display: none'});
			$('#addBookContainer').attr({'style':'display: block'});
			$('#addBookButton').attr({'style':'display: none'});
			$('#showLibraryButton').attr({'style':'display: block'});
		},

		showLibraryView: function() {
			console.log('Add Book Router');
			$('#books').attr({'style':'display: block'});
			$('#addBookContainer').attr({'style':'display: none'});
			$('#addBookButton').attr({'style':'display: block'});
			$('#showLibraryButton').attr({'style':'display: none'});
		}
	});

	return LibraryRouter;
});
